﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate;
using Webshop20.Infrastructure.Persistence.NH.Configuration;

namespace Webshop20.Tests.Integration
{
    public class ObjectMother
    {
        private static ISessionFactory sessionFactory;

        public static ISessionFactory GetSessionFactory()
        {
            if (sessionFactory == null)
                sessionFactory =
                    NHibernateSetup.GetSessionFactory(@"Data Source=NOTEBOOK\SQLEXPRESS;Initial Catalog=webshop247;Integrated Security=True;Pooling=False");

            return sessionFactory;
        }
    }
}
